home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / tcp / socksproxy.lha / SOCKS Proxy / Install SOCKS Proxy < prev    next >
Encoding:
Text File  |  1997-11-30  |  2.3 KB  |  63 lines

  1. (set @default-dest "AmiTCP:bin")
  2.  
  3. (if (< @user-level 2)
  4.   (abort "The installation can only proceed in expert user mode.\nThe SOCKS proxy installation requires the user\nto provide some networking configuration parameters\nand cannot be installed otherwise.")
  5. )
  6.  
  7. (set #installdir
  8.   (askdir
  9.     (prompt "Where would you like to install the SOCKS proxy program\n(a directory will NOT be created)?")
  10.     (help "This is the location where the SOCKS proxy binary will be installed.")
  11.     (default "AmiTCP:bin")
  12.   )
  13. )
  14.  
  15. (copyfiles
  16.   (prompt ("Copying SOCKS proxy program to %s..." #installdir))
  17.   (help @copyfiles-help)
  18.   (source "socks")
  19.   (dest #installdir)
  20. )
  21.  
  22. (set #proxyaddress
  23.   (askstring
  24.       (prompt "What is the address of the SOCKS proxy server\nthat you would like to use?")
  25.       (help "This is the IP address (either as a fully qualified\nhostname or a dotted numerical IP address)\nof the SOCKS proxy server to be used.")
  26.       (default "192.0.2.1")
  27.   )
  28. )
  29.  
  30. (set #directnetwork
  31.   (askstring
  32.     (prompt "What is the IP address of the network that is\ndirectly accesible by your computer?")
  33.     (help "This is the IP address of the network that your\ncomputer can access directly, without\nhaving to go through the SOCKS proxy server.")
  34.     (default "192.0.2.0")
  35.   )
  36. )
  37.  
  38. (set #directnetmask
  39.   (askstring
  40.     (prompt "What is the netmask of the network that is\ndirectly accesible by your computer?")
  41.     (help "This is the netmask of the network that your\ncomputer can access directly, without\nhaving to go through the SOCKS proxy server.")
  42.     (default "255.255.255.0")
  43.   )
  44. )
  45.  
  46. (textfile
  47.   (prompt "Create SOCKS configuration file socks.conf in ENV: and ENVARC:?")
  48.   (help "This will create a default configuration file\nfor SOCKS proxy based on the parameters provided.")
  49.   (dest "ENV:socks.conf")
  50.   (append ("direct %s %s\nsockd 0.0.0.0 0.0.0.0\n" #directnetwork #directnetmask))
  51.   (confirm)
  52. )
  53.  
  54. (run "C:Copy FROM ENV:socks.conf TO ENVARC:socks.conf CLONE QUIET")
  55.  
  56. (startup "SocksProxy"
  57.   (prompt ("Add the following lines to your S:User-Startup?\n\nSetEnv SOCKS_SERVER \"%s\"\nRun <>NIL: %s\n" #proxyaddress (tackon #installdir "socks")))
  58.   (help "This will add a line to your user startup script\nto set the SOCKS_SERVER environment variable.")
  59.     (command ("SetEnv SOCKS_SERVER \"%s\"\n" #proxyaddress))
  60.     (command ("Run <>NIL: %s\n" (tackon #installdir "socks")))
  61.     (confirm)
  62. )
  63.